package com.ato.EnumTest;

/**
 * @author wangjing
 * @create 2021--11--03--19:23
 */
public class ClassEnum {


    public static void main(String[] args) {
        System.out.println(CustomEnum.SUCCESS);
    }
}

class CustomEnum {
    public static final CustomEnum SUCCESS = new CustomEnum("success", 200);

    private CustomEnum(String message, int code) {
        this.code = code;
        this.message = message;
    }

    private final String message;
    private final int code;

    @Override
    public String toString() {
        return "CustomEnum{" +
                "message='" + message + '\'' +
                ", code=" + code +
                '}';
    }
}